/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PanelAdminUsuarios.java
 *
 * Created on 10/05/2010, 03:52:50 PM
 */

package GUI.Bibliotecario.AdminUsuarios;

/**
 *
 * @author sebaxtian
 */
public class PanelAdminUsuarios extends javax.swing.JPanel {

    private PanelRegistrarUsuario panelRegistrarUsuario;
    private PanelActualizarUsuario panelActualizarUsuario;
    private PanelDesactivarUsuario panelDesactivarUsuario;

    /** Creates new form PanelAdminUsuarios */
    public PanelAdminUsuarios() {
        initComponents();
        panelRegistrarUsuario = new PanelRegistrarUsuario();
        panelActualizarUsuario = new PanelActualizarUsuario();
        panelDesactivarUsuario = new PanelDesactivarUsuario();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        btnRegistrar = new javax.swing.JButton();
        btnActualizar = new javax.swing.JButton();
        btnDesactivar = new javax.swing.JButton();

        setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Administracion de Usuarios", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));
        setLayout(new java.awt.BorderLayout());

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Opciones de Administracion"));

        btnRegistrar.setText("Registrar");
        btnRegistrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRegistrarActionPerformed(evt);
            }
        });
        jPanel1.add(btnRegistrar);

        btnActualizar.setText("Actualizar");
        btnActualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnActualizarActionPerformed(evt);
            }
        });
        jPanel1.add(btnActualizar);

        btnDesactivar.setText("Desactivar");
        btnDesactivar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDesactivarActionPerformed(evt);
            }
        });
        jPanel1.add(btnDesactivar);

        add(jPanel1, java.awt.BorderLayout.PAGE_START);
    }// </editor-fold>//GEN-END:initComponents

    private void btnRegistrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRegistrarActionPerformed
        // TODO add your handling code here:
        this.remove(panelRegistrarUsuario);
        this.remove(panelActualizarUsuario);
        this.remove(panelDesactivarUsuario);
        this.add(panelRegistrarUsuario, java.awt.BorderLayout.CENTER);
        this.updateUI();
    }//GEN-LAST:event_btnRegistrarActionPerformed

    private void btnActualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnActualizarActionPerformed
        // TODO add your handling code here:
        this.remove(panelRegistrarUsuario);
        this.remove(panelActualizarUsuario);
        this.remove(panelDesactivarUsuario);
        this.add(panelActualizarUsuario, java.awt.BorderLayout.CENTER);
        this.updateUI();
    }//GEN-LAST:event_btnActualizarActionPerformed

    private void btnDesactivarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDesactivarActionPerformed
        // TODO add your handling code here:
        this.remove(panelRegistrarUsuario);
        this.remove(panelActualizarUsuario);
        this.remove(panelDesactivarUsuario);
        this.add(panelDesactivarUsuario, java.awt.BorderLayout.CENTER);
        this.updateUI();
}//GEN-LAST:event_btnDesactivarActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnActualizar;
    private javax.swing.JButton btnDesactivar;
    private javax.swing.JButton btnRegistrar;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables

}
